package com.ht.springboot.config;

import com.ht.springboot.pojo.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {
    @Bean("a")
    public User user(){
        User user = new User();
        user.setName("zhangsan");
        return user;
    }

    @Bean("b")
    public User user2() {
        User user = new User();
        user.setName("里斯");
        return user;
    }
}
